#ifndef _L3G4200D_H
#define _L3G4200D_H

#include <WProgram.h>

#define CTRL_REG1 0x20
#define CTRL_REG2 0x21
#define CTRL_REG3 0x22
#define CTRL_REG4 0x23
#define CTRL_REG5 0x24
#define L3G4200D_Address 0x69

//int L3G4200D_Address = 105; //I2C address of the L3G4200D

class L3G4200D
{
	private:
		int readRegister(int deviceAddress, byte address);
		void writeRegister(int deviceAddress, byte address, byte val);
		int setupL3G4200D(int scale);

	public:
		L3G4200D();

		void begin();
		void end();
		
		int getX();
		int getY();
		int getZ();
};


#endif